#ifndef QTEMPLATENAMEWIDGET_H
#define QTEMPLATENAMEWIDGET_H

#include <QWidget>

namespace Ui {
class QTemplateNameWidget;
}

namespace CORELIB
{
    class QToolBarButton;
}

class QTreeWidgetItem;
class QTemplateTreeWidget;

class QTemplateNameWidget : public QWidget
{
    Q_OBJECT
    
public:
    explicit QTemplateNameWidget(QWidget *parent = 0);
    ~QTemplateNameWidget();
    
    void setText(const QString &text);
    void set_tree_item(QTemplateTreeWidget* tree,QTreeWidgetItem* item);

    void set_up_button_visible(bool visible);
private:
    Ui::QTemplateNameWidget *ui;
protected slots:
    void  remove();
    void  movetotemp();
protected:
    CORELIB::QToolBarButton     *m_up_button;
    CORELIB::QToolBarButton     *m_remove_button;

    QTreeWidgetItem             *m_item;
    QTemplateTreeWidget         *m_tree;

};

#endif // QTEMPLATENAMEWIDGET_H
